#include <QtGui/QApplication>
#include <QTextCodec>
#include <QTranslator>  // マルチランゲージ
#include <QLocale>      // マルチランゲージ
#include "qmlapplicationviewer.h"
#include "qmlfile.h"
#include "qmladb.h"

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QApplication> app(createApplication(argc, argv));

    qmlRegisterType<QMLFile>("QMLFile", 1, 0, "QMLFile");
    qmlRegisterType<QMLAdb>("QMLAdb", 1, 0, "QMLAdb");

    QTranslator translator;
    translator.load(QLatin1String("qml_" )+QLocale::system().name()
                  , QLatin1String("qml/JcThemeSimulator/i18n"));
    app->installTranslator(&translator);

    QmlApplicationViewer viewer;
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
    viewer.setMainQmlFile(QLatin1String("qml/JcThemeSimulator/main.qml"));
    viewer.showExpanded();

    return app->exec();
}
